class Person {
  readonly name: string;
  age: number;

  constructor(name: string, age: number) {
    this.name = name;
    this.age = age;
  }
}
const p1 = new Person("why", 12);

//只读属性不能修改操作
// p1.name = "张明";

export {};
